Containers and DevOps

Learn about application development, both with and without containers, and about web applications.

Application development#

Application development is complicated by the interplay between the application and its environment. One way or another, applications run on an operating system. The operating system contains configuration files, environment variables, and other settings that affect the running of all applications. Containerization, the development of applications in containers, supports DevOps practices by making application development and deployment faster and more reliable.

Web application#

A web application, for example, runs on an OS and is dependent on web server software. Web servers include Tomcat, Apache, IIS, Node.js, and many others. Some applications need a runtime, such as those developed in Java or .NET. The operating systems and all these supporting systems each have configurations that affect the web applications they host. An incorrect configuration can hamper performance or even cause the application to fail entirely.

Deployment
Deployment
Continuous 
Continuous 
Integration
Integration
ENVIRONMENTS
ENVIRONMENTS
Build/Test
Build/Test
Code
Submitted
Code...
Release
Committed
Release...
Application components are combined and tested together
Application componen...
INTEGRATION
INTEGRATION
New application components are tested individually 
New application comp...
DEVELOPMENT
DEVELOPMENT
Business users interact with new features and give feedback; security testing is performed
Business users inter...
QUALITY ASSURANCE (QA)
QUALITY ASSURANCE...
Deployment is
tested
Deployment is...
PRE- PRODUCTION
PRE- PRODUCTION
The application is available for use
The application is a...
PRODUCTION
PRODUCTION
Developer
Developer
User
User
Viewer does not support full SVG 1.1
Software releases are deployed from one environment to the next before reaching production

Consider that most web applications aren’t hosted on just one web server but many. Very busy websites on the public internet are typically supported by hundreds or thousands of web servers, all running to support millions of requests an hour (this is commonly known as a web farm). Each one of those servers has its own set of configurations. How do engineers keep all those configurations consistent so that each web server functions at peak efficiency? Containers provide one very compelling solution.

Application deployment without containers#

Without containers, application deployment only deploys application files, not configuration. The configuration is stored and maintained separately on the servers. This leads to a complication: Engineers can’t be completely assured that the application will perform correctly until after deployment. If one of the configurations is incorrect, nobody knows until after a failure. This is especially problematic in a production environment. Faults and defects should be detected early in the testing process. Testing an application with its configuration from the very beginning of the development process ensures higher quality.

Small changes made directly to servers after they’re provisioned can cause unexpected and unintended changes. Over time, differences between servers in a web farm can creep into the configurations. Configurations begin to vary between servers that should be identical. This is called configuration drift. Configuration drift is very common, especially in organizations with little or no automation.

DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
DEPLOY
APPLICATION
RELEASE
APPLICATION...
DEVELOPMENT
DEVELOPMENT
SERVER B
SERVER B
CONFIG
CONFIG
APP
APP
SERVER A
SERVER A
CONFIG
CONFIG
APP
APP
QUALITY ASSURANCE (QA)
QUALITY ASSURANCE (QA)
SERVER B
SERVER B
CONFIG
CONFIG
APP
APP
SERVER A
SERVER A
CONFIG
CONFIG
APP
APP
PRODUCTION
PRODUCTION
SERVER B
SERVER B
CONFIG
CONFIG
APP
APP
SERVER A
SERVER A
CONFIG
CONFIG
APP
APP
Viewer does not support full SVG 1.1
Application deployment without containers deploys applications but not configuration

Application deployment with containers#

Applications developed in containers are developed and deployed with their environment and configuration. Software developers are able to test containers before they’re deployed. If a container functions properly in a development environment, it will function exactly the same way when deployed to other environments. Applications developed this way are more reliable because they’re developed, tested, and versioned together with their configuration.

Container
Container
DEPLOY
DEPLOY
FILESYSTEM
FILESYSTEM
CONFIG
CONFIG
APP
APP
Container
Container
Container
Container
Container
Container
CONTAINER HOST
CONTAINER HOST
DEVELOPMENT
DEVELOPMENT
Container
Container
Container
Container
Container
Container
CONTAINER HOST
CONTAINER HOST
QUALITY ASSURANCE (QA)
QUALITY ASSURANCE (QA)
Container
Container
Container
Container
Container
Container
CONTAINER HOST
CONTAINER HOST
PRODUCTION
PRODUCTION
Viewer does not support full SVG 1.1
Containers are deployed with code, configuration, and an isolated file system

Docker

Docker, DevOps Katas, and DevOps Practices by Containerization